<?php
echo '<div id="priority_messages">';
    foreach ($this->priorityMessages as $label=>$messages) {
    	
        switch($label) {
        	case 'sucess':
        			$divClass = 'internalSucess';
        		break;
        	
        	case 'error':
        			$divClass = 'internalError';
        		break;
        		
        	case 'alert':
        			$divClass = 'internalAlert';
        		break;
        } 
    	
      if (count($messages)) {
      	echo '<div id="internalMessages" class="'.$divClass.'">';
	        echo '<ul">';
	        foreach ($messages as $message) {
	        	echo '<li>'.$message.'</li>';
	        }
	        echo '</ul>';
        echo '</div>';
      }
    }
echo '</div>';
